<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@page import="docmanager.engine.DMController"%>
<%@page import="docmanager.business.objects.*"%>
<%@page import="java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>


<table>
<tr> <td> Tipo de Documento </td>
<% 

String nextOp = "PENDIENTE";
if ("consulta".equals(request.getAttribute("accion")))
	nextOp = "ConsultarDocumento2";

List<TipoDocumento> tipos = (List<TipoDocumento>) request.getAttribute("tipos");
Iterator it = tipos.iterator();
while (it.hasNext())
{
	TipoDocumento tipo = (TipoDocumento)  it.next();
	%>

	<tr>
	  <td><a href="DMController?op=<%=nextOp%>&id=<%=tipo.getId() %>" >  <%=tipo.getDescripcion() %> </a> </td>
	</tr>
	
	<%
	
}

%>

</table>

<%
	String serverPath = DMController.getServerPath(request);
%>
<script type="text/javascript">			
function execMenuPrincipal()
{
    document.location.href = "<%=serverPath%>/DMController?op=MenuPrincipal"
}

</script>
       <input type="button" value="Menu Principal" name="menuPrincipal" onclick="execMenuPrincipal();">


</body>
</html>